﻿<%@ Page Title="" Language="C#" MasterPageFile="~/SiteMaster.Master" AutoEventWireup="true" CodeBehind="Confirm.aspx.cs" Inherits="Web.Confirm" %>
<asp:Content ID="Content1" ContentPlaceHolderID="head" runat="server">
</asp:Content>
<asp:Content ID="Content2" ContentPlaceHolderID="ContentPlaceHolder1" runat="server">
    <div style="width: 800px">
        <div class="Box">
            <div class="BoxTitle">
                Đặt chỗ thành công
            </div>
            <div class="BoxContent">
                <span style="font-size: 16px; font-weight: bold">Booking code:</span>
                <span style="font-size: 16px; font-weight: bold; color: green"><asp:Label ID="lblBookingCode" runat="server"></asp:Label></span>
            </div>
        </div>
        <div class="Box">
            <div class="BoxTitle">
                Thông tin hành trình
            </div>
            <div id="FlightDetail" runat="server" class="BoxContent">
                <div class="BoxFareOption" style="width: 780px;margin-bottom:0px">
                    <div class="FlightContent">
                        <%--Departure--%>
                        <div class="FilghtItem">
                            <div class="FlightDirection">
                                Chuyến đi:
                            </div>
                            <div class="FilghtInfo" style="border:none">
                                <div class="FlightInfoDetails">
                                    <asp:Repeater ID="repDepartureFlightDetail" runat="server">
                                        <ItemTemplate>
                                            <table>
                                                <tr>
                                                    <td class="Airline">
                                                        <img alt="Airline logo" src='<%# "/Images/Airline/" + ((Eval("AirlineDetail.Logo") == null) ? "default.png" : Eval("AirlineDetail.Logo")) %>' />
                                                    </td>
                                                    <td class="Point">
                                                        <div class="City">
                                                            <%# Eval("StartPointCity.Name_Vi")%>
                                                        </div>
                                                        <div class="Time">
                                                            <span class="TimeTitle">Cất cánh lúc</span> <%# new IBE.Common().GetDate(Eval("StartDt").ToString(), Eval("StartTm").ToString()).ToString("HH:mm")%><br />
                                                            <span class="TimeTitle">Ngày</span> <%# new IBE.Common().GetDate(Eval("StartDt").ToString(), Eval("StartTm").ToString()).ToString("dd/MM/yyyy")%>
                                                        </div>
                                                    </td>
                                                    <td class="Point">
                                                        <div class="City">
                                                            <%# Eval("EndPointCity.Name_Vi") %>
                                                        </div>
                                                        <div class="Time">
                                                            <span class="TimeTitle">Hạ cánh lúc</span> <%# new IBE.Common().GetDate(Eval("EndDt").ToString(), Eval("EndTm").ToString()).ToString("HH:mm")%><br />
                                                            <span class="TimeTitle">Ngày</span> <%# new IBE.Common().GetDate(Eval("EndDt").ToString(), Eval("EndTm").ToString()).ToString("dd/MM/yyyy")%>
                                                        </div>
                                                    </td>
                                                    <td class="Detail">
                                                        Hãng vận chuyển: <b><%# Eval("OpAirlineDetail.Name_Vi") %></b><br />
                                                        Số hiệu chuyến bay: <b><%# (Eval("IBE") == "lowcost") ? "" : Eval("AirlineDetail.Code")%><%# Eval("FltNum").ToString()%></b><br />
                                                        Thời gian bay: <b><%# string.Format("{0}h {1}m", TimeSpan.FromMinutes(Convert.ToInt32(Eval("FltTm"))).Hours, TimeSpan.FromMinutes(Convert.ToInt32(Eval("FltTm"))).Minutes) %></b><br />
                                                        Hạng chỗ: <b><%# Eval("ClassAdult") != "" ? Eval("ClassAdult") : "-" %></b>
                                                    </td>
                                                </tr>
                                            </table>

                                            <div style='<%# (Eval("IsLastItem").ToString() == "1") ? "display: none": "display: block" %>' class="StopBar">
                                                Dừng tại: <b><%# Eval("EndPointCity.Name_Vi")%> - <%# (Eval("EndPointAirport.Name_Vi") == Eval("EndPointAirport.Code")) ? "" : Eval("EndPointAirport.Name_Vi")%></b>
                                                - Thời gian dừng: <b><%# string.Format("{0}h {1}m", ((TimeSpan)Eval("StopTime")).Days * 24 + ((TimeSpan)Eval("StopTime")).Hours, ((TimeSpan)Eval("StopTime")).Minutes)%></b>
                                            </div>
                                        </ItemTemplate>
                                    </asp:Repeater>
                                </div>
                            </div>
                        </div>
                        <%--Return--%>
                        <asp:Panel ID="pnReturn" runat="server" Visible="false">
                            <div class="FilghtItem">
                                <div class="FlightDirection">
                                    Chuyến về:
                                </div>
                                <div class="FilghtInfo" style="border:none">
                                    <div class="FlightInfoDetails">
                                        <asp:Repeater ID="repReturnFlightDetail" runat="server">
                                            <ItemTemplate>
                                                <table>
                                                    <tr>
                                                        <td class="Airline">
                                                            <img alt="Airline logo" src='<%# "/Images/Airline/" + ((Eval("AirlineDetail.Logo") == null) ? "default.png" : Eval("AirlineDetail.Logo")) %>' />
                                                        </td>
                                                        <td class="Point">
                                                            <div class="City">
                                                                <%# Eval("StartPointCity.Name_Vi")%>
                                                            </div>
                                                            <div class="Time">
                                                                <span class="TimeTitle">Cất cánh lúc</span> <%# new IBE.Common().GetDate(Eval("StartDt").ToString(), Eval("StartTm").ToString()).ToString("HH:mm")%><br />
                                                                <span class="TimeTitle">Ngày</span> <%# new IBE.Common().GetDate(Eval("StartDt").ToString(), Eval("StartTm").ToString()).ToString("dd/MM/yyyy")%>
                                                            </div>
                                                        </td>
                                                        <td class="Point">
                                                            <div class="City">
                                                                <%# Eval("EndPointCity.Name_Vi") %>
                                                            </div>
                                                            <div class="Time">
                                                                <span class="TimeTitle">Hạ cánh lúc</span> <%# new IBE.Common().GetDate(Eval("EndDt").ToString(), Eval("EndTm").ToString()).ToString("HH:mm")%><br />
                                                                <span class="TimeTitle">Ngày</span> <%# new IBE.Common().GetDate(Eval("EndDt").ToString(), Eval("EndTm").ToString()).ToString("dd/MM/yyyy")%>
                                                            </div>
                                                        </td>
                                                        <td class="Detail">
                                                            Hãng vận chuyển: <b><%# Eval("OpAirlineDetail.Name_Vi") %></b><br />
                                                            Số hiệu chuyến bay: <b><%# (Eval("IBE") == "lowcost") ? "" : Eval("AirlineDetail.Code")%><%# Eval("FltNum").ToString()%></b><br />
                                                            Thời gian bay: <b><%# string.Format("{0}h {1}m", TimeSpan.FromMinutes(Convert.ToInt32(Eval("FltTm"))).Hours, TimeSpan.FromMinutes(Convert.ToInt32(Eval("FltTm"))).Minutes) %></b><br />
                                                            Hạng chỗ: <b><%# Eval("ClassAdult") != "" ? Eval("ClassAdult") : "-" %></b>
                                                        </td>
                                                    </tr>
                                                </table>

                                                <div style='<%# (Eval("IsLastItem").ToString() == "1") ? "display: none": "display: block" %>' class="StopBar">
                                                    Dừng tại: <b><%# Eval("EndPointCity.Name_Vi")%> - <%# (Eval("EndPointAirport.Name_Vi") == Eval("EndPointAirport.Code")) ? "" : Eval("EndPointAirport.Name_Vi")%></b>
                                                    - Thời gian dừng: <b><%# string.Format("{0}h {1}m", ((TimeSpan)Eval("StopTime")).Days * 24 + ((TimeSpan)Eval("StopTime")).Hours, ((TimeSpan)Eval("StopTime")).Minutes)%></b>
                                                </div>
                                            </ItemTemplate>
                                        </asp:Repeater>
                                    </div>
                                </div>
                            </div>
                        </asp:Panel>
                    </div>
                    <div class="Clear"></div>
                </div>
            </div>
            <div id="FlightSummary" runat="server" class="BoxContent">
                <div class="BoxFareOption" style="width: 780px;margin-bottom:0px">
                    <div class="FlightContent">
                        <div class="FilghtItem" style="border:none">
                            <div class="FilghtInfo">
                                <div class="FilghtInfoSummary">
                                    <table style="width: 100%">
                                        <tr>
                                            <td class="Airline">
                                                <asp:Image ID="imgAirlineLogo" runat="server" />
                                            </td>
                                            <td class="Point">
                                                <div class="City">
                                                    <asp:Label ID="lblStartPoint" runat="server"></asp:Label>
                                                </div>
                                                <div class="Time">
                                                    <asp:Label ID="lblStartTime" runat="server"></asp:Label>
                                                    <span style="font-size: 12px;">
                                                        <asp:Label ID="lblStartDate" runat="server"></asp:Label>
                                                    </span>
                                                </div>
                                            </td>
                                            <td class="Point">
                                                <div class="City">
                                                    <asp:Label ID="lblEndPoint" runat="server"></asp:Label>
                                                </div>
                                                <div class="Time">
                                                    -
                                                </div>
                                            </td>
                                            <td class="Detail">
                                                Điểm dừng:
                                                <b>
                                                    <asp:Label ID="lblNumStop" runat="server"></asp:Label>
                                                </b>
                                            </td>
                                        </tr>
                                    </table>
                                </div>
                                <div class="Clear"></div>
                            </div>
                        </div>
                    </div>
                    <div class="Clear"></div>
                </div>
            </div>
        </div>
        <div class="Box">
            <div class="BoxTitle">
                Danh sách hành khách & chi tiết giá
            </div>
            <div class="BoxContent">
                <table style="width: 100%;">
                    <tr>
                        <td style="width:30px;text-align: center">
                            <b>STT</b>
                        </td>
                        <td style="width: 100px;">
                            <b>Loại khách</b>
                        </td>
                        <td style="width: 100px;text-align: center">
                            <b>Giới tính</b>
                        </td>
                        <td style="width: 230px;text-align: left">
                            <b>Họ & Tên</b>
                        </td>
                        <td style="width: 100px;text-align: center">
                            <b>Ngày sinh</b>
                        </td>
                        <td style="width: 130px;text-align: right">
                            <b>Giá vé</b>
                        </td>
                    </tr>
                    <asp:Repeater ID="repPax" runat="server">
                        <ItemTemplate>
                            <tr>
                                <td style="text-align: center">
                                    <%# Convert.ToInt32(DataBinder.Eval(Container, "ItemIndex")) + 1 %>
                                </td>
                                <td>
                                    <%# Eval("tblPassengerType.Name_Vi") %>
                                </td>
                                <td style="text-align: center">
                                    <%# bool.Parse(Eval("Gender").ToString()) ? "Nam" : "Nữ" %>
                                </td>
                                <td>
                                    <%# Eval("FirstName").ToString() + " " + Eval("LastName").ToString() %>
                                </td>
                                <td style="text-align: center">
                                    <%# (Eval("PassengerType").ToString() != "ADT") ? DateTime.Parse(Eval("Birthday").ToString()).ToString("dd-MM-yyyy") : "-" %>
                                </td>
                                <td style="text-align: right">
                                    <b><%# (Convert.ToDouble(Eval("Price")) + Convert.ToDouble(Eval("Fee"))).ToString("#,0.##") %> <%# Eval("tblBooking.CurrencyCode") %></b>
                                 </td>
                            </tr>
                        </ItemTemplate>
                    </asp:Repeater>
                    <tr>
                        <td colspan="5" style="text-align: right">
                            <strong>Tổng giá</strong>
                        </td>
                        <td class="TotalPrice">
                            <asp:Label ID="lblGrandTotal" runat="server"></asp:Label>
                        </td>
                    </tr>
                </table>
            </div>
        </div>
        <div class="Box">
            <div class="BoxTitle">
                Thông tin liên hệ
            </div>
            <div class="BoxContent">
                <table style="width: 100%;">
                    <tr>
                        <td style="width: 150px">Quý danh:</td>
                        <td>
                            <asp:Label ID="lblContactTitle" runat="server"></asp:Label>
                        </td>
                    </tr>
                
                    <tr>
                        <td>Họ tên:</td>
                        <td>
                            <asp:Label ID="lblName" runat="server"></asp:Label>
                        </td>
                    </tr>
                
                    <tr>
                        <td>Số điện thoại:</td>
                        <td>
                            <asp:Label ID="lblPhone" runat="server"></asp:Label>
                        </td>
                    </tr>
                
                    <tr>
                        <td>Email:</td>
                        <td>
                            <asp:Label ID="lblEmail" runat="server"></asp:Label>
                        </td>
                    </tr>
                
                    <tr>
                        <td>Địa chỉ:</td>
                        <td>
                            <asp:Label ID="lblAddress" runat="server"></asp:Label>
                        </td>
                    </tr>
                
                    <tr>
                        <td>Yêu cầu đặc biệt:</td>
                        <td>
                            <asp:Label ID="lblNote" runat="server"></asp:Label>
                        </td>
                    </tr>
                
                </table>
            </div>
        </div>
    </div>
</asp:Content>
